1. Field of Invention
The invention relates to a method and a device for conditioning a periodic analog signal to predetermined positive and negative desired peak values.
2. Description of the Related Art
In position measurements, and in particular measuring distances, rotational speeds or angles of rotation, use is made of incremental measurement systems using sensors. Sensors provide two alternating periodic electrical signals being phase-displaced by 90xc2x0 relative to each other. Signals of this type are also called orthogonal. The sensor usually senses a material measured, e.g. a marked code disk or a code ruler. The generated signals are in most cases of sinusoidal shape, but may also be triangular or trapezoidal in shape. For the sake of simplification, reference will be made in the following to sine and cosine signals. The amplitudes of sinusoidal signals in sensors or other devices vary, are age-dependent, depend on operating frequency, temperature, and supply voltage, and are subject to the influence of the material measured. These influences may lead to fluctuations in signal deviation, including fluctuations of signal amplitude. However, fluctuations in signal offset are also possible. Finally, signal phase deviations may also occur, in particular due to geometric or mechanical shift or changes in the sensor in connection with the scanned material measure.
In order to achieve synchronization in such incremental measurement systems, a synchronization signal is also provided in many cases which, due to its asymmetrical, periodic signal shape, enables a synchronization of the alternating signals to the material measure and thus a unique definition of a coordinate system.
Faulty electrical signals considerably limit the performance of such measurement systems and lead to errors in the detected distances, rotational speeds or angles of rotation.
A method for correcting the aforementioned fluctuations of amplitude is known from patent DE 38 43 108. The known method includes checking whether the positive and negative peak values of the sine and cosine signals have their peaks within a certain window. If this is not the case, the signal is corrected thereafter by suitable amplifications or by suitable additions. The type of correction is selected according to whether the signal is greater or less than the window, or to which correction was performed in the previous half-wave. Therefore, signal deviations from the window may require many periods for necessary conditioning. This may have an adverse effect on the first calibration upon power-on or even make necessary signal conditioning virtually impossible.
Patent EP 0,489,936 proposes a further improvement to the method described in patent DE 38 43 108, which reduces the circuitry overhead.
Patent application DE 197 12 622 describes an arrangement and a method for correcting erroneous signals in incremental measurement devices. For signal conditioning, a microprocessor is employed, which determines correcting factors in a closed loop in order to achieve higher precision.
The document xe2x80x9cDie neue Dimension in der Weg- and Winkelmesstechnikxe2x80x9d, R. Burgschat, F and M, Feintechnik, Microtechnik, Microelektronik, Volume 10, 1996, discloses the use of digital potentiometers in an application specific integrated circuit (ASIC) for signal correction.
It is known from patent application DE 42 42 145 to correct a phase deviation of sinusoidal signals by summing and subtracting both signals to obtain further sinusoidal signals which no longer exhibit the statistic phase deviation, but have an exact phase shift of 900.
Based upon the foregoing, there is a need for a technique which simply and effectively conditions periodic signals within a relatively short period of time.
Embodiments of the present invention overcome shortcomings in prior techniques and satisfy a significant need for conditioning a periodic analog signal to obtain predetermined positive and negative desired peak values, and allowing a correction to be obtained within few signal periods without utilization of a microprocessor.
According to exemplary embodiments of the present invention, the difference between the actual peak value of the periodic analog signal and a predetermined, desired peak value is stepwise reduced and compensated by repeated adjustment of the analog signal using modifying steps within a part of the period of the analog signal, with each modifying step including one multiplicative and one additive correcting step.
Upon detection of an actual peak value of the signal, the difference to the predetermined, desired peak value is no longer compensated stepwise over several periods by performing an adjusting step every half period of the analog signal, as seen in prior techniques. Rather, a multiplicity of adjusting steps are performed. Each adjusting step includes two correcting steps, namely one multiplicative correcting step, which increases or decreases the signal amplitude, and an additive correcting step, which adds a positive or a negative constant or offset to the signal, thus changing the signal level. Both correcting steps are carried out substantially simultaneously. This procedure offers the advantage of rapid signal conditioning.
Thus, with each adjusting step, the signal is changed in two respects. On the one hand, the signal is subjected to a multiplicative correction, on the other hand, to an additive correction. Both corrections are always performed in one single adjusting step. In general, the multiplicative and/or additive correcting steps are freely selectable, but may be fixed. The incremental procedure allows four different adjusting steps: an increasing, multiplicative correcting step in combination with an additive correcting step in a positive direction; an increasing multiplicative correcting step in combination with an additive correcting step in a negative direction; a reducing multiplicative correcting step in combination with an additive correcting step in a positive direction; and a reducing multiplicative correcting step in combination with an additive correcting step in a negative direction. The type of increasing step actually used conveniently depends on the position of the current actual peak value of the signal to be corrected relative to the predetermined desired peak value, and on the part of the period in which the actual peak value was detected. A change of the signal and a comparison of the actual peak value with the desired peak value are effected until no further conditioning is needed or an abort criterion is reached. The conditioning signal converges particularly fast towards the predetermined target values by selecting multiplicative and additive correcting steps according to the following table.
In this table, a positive/negative part of the period is understood to be a part of the period during which the signal is greater/less than zero. The figures xe2x80x9cxe2x88x921xe2x80x9d and xe2x80x9c+1xe2x80x9d in the column of the multiplicative and the additive correcting step respectively indicate whether the step is an increasing or a decreasing multiplicative step, or an additive correcting step in a positive or a negative direction.
Exemplary embodiments of the present invention are particularly easy to carry out if the frequency at which the stepwise modification is carried out is sufficiently high relative to the bandwidth of the signal to be corrected, because it may then be assumed that the signal value used for comparison with the desired peak value remains essentially unchanged when the modifications are performed.
If this requirement cannot be fulfilled, e.g. because rapidly changing signals are to be conditioned, the actual peak value is temporarily stored, e.g. in a peak value detector circuit having a sample-and-hold element for a comparison showing whether convergence has been achieved. Otherwise, the value of the signal would move too far away from the actual peak value during the sequence of modifying steps. Of course, this means that not only the signal must be changed by the modifying steps, but also the temporarily stored value used for the convergence comparison, because otherwise it could not be determined when convergence occurs between the actual peak value and the desired peak value. Consequently, the precision of the temporarily stored actual peak value and/or of the change of this actual peak value must meet certain requirements. In particular, deviations in the behavior between the temporarily stored actual peak value and the actual signal are disadvantageous.
Therefore, according to an exemplary embodiment of the present invention, after the actual peak value of the signal to be corrected is temporarily stored, a reference signal is stepwise adjusted from the predetermined desired peak value to the actual peak value stored, and the number of adjusting steps required is counted. The signal to be conditioned is then modified by the same number of modifying steps, the size of one modifying step corresponding to that of one adjusting step.
Thus, according to this exemplary embodiment of the present invention, a reference signal is stepwise adjusted from the desired peak value to the actual peak value and the required number of adjusting steps is counted. An adjusting step is selected such that it corresponds to a modifying step with respect to its size. Once the reference signal approaches the actual stored peak value of the signal, the signal to be conditioned is modified by the same number of modifying steps. Thus, for error detection according to this exemplary method, the reference voltage is first adjusted until convergence at the actual peak value stored. It is only then 30 that a corresponding modification of the signal to be conditioned/corrected is carried out by performing error correction. Consequently, error detection and error correction are not performed at the same time. Moreover, since the reference signal is modified, the actual peak value may be easily stored even at high frequencies of the signal to be conditioned without the value having to be variable. It is particularly convenient to carry out the error correction at a low actual signal value, in particular at a zero crossing of the periodic signal being conditioned/corrected.
As mentioned above, storage of the actual peak values can be dispensed with if the modifying steps are carried out at a frequency that is greater than the signal bandwidth. The exemplary method then requires a smaller amount of circuitry.
If there are two signals to be conditioned that are orthogonal, i.e. phase-relative to each other by 90xc2x0, the presence of the peak value of a signal is detectable by the zero passage of the other signal.
Another exemplary embodiment of the present invention employs a reference signal for conditioning two orthogonal signals (referred to hereinafter as sine signal and cosine signals). Conditioning is such that, initiated by the zero crossing of the sine signal, the actual peak value of the cosine signal is compared with the reference signal, which is then stepwise approximated from the predetermined desired peak value to the actual peak value in equally dimensioned steps, until the cosine and reference signals are both substantially identical. The number and direction of the required adjusting steps for adapting the reference signal are counted and stored. Upon the occurrence of a zero crossing of the cosine signal, the same number of modifying steps, each including a multiplicative step and an additive correcting step, are stepwise applied to the cosine signal, so that this signal is suitably conditioned. The zero crossing of the cosine signal simultaneously initiates the above-described, stepwise adaptation of the reference voltage to the stored actual peak value of the sine signal.
On the one hand, this step-by-step operating mode has the advantage that, because the delay period between the adjustment of the reference signal and the comparison of the current reference signal value with the actual peak value (one clock period) is known, exact statements on the dynamic limits of the method are possible. Further, the detection of the zero crossing of one signal and the sampling of the actual peak value of the other signal is carried out at substantially the same time. Finally, an overshoot of the conditioning operation is avoided due to the error correction being carried out separately from the error detection.
Conveniently, the adaptation of the reference signal to the stored actual peak value is terminated only if the approximation has been achieved. Ideally, a maximum of two periods will be required for complete conditioning of a sine or cosine signal, regardless of the size of the signal error. However, it is also possible to abort after a certain time or a certain number of modifying steps.
However, for the conditioning of the analog signal to the desired peak value to reach convergence and, moreover, to require only a finite number of operations, the multiplicative and additive correcting steps should fulfill certain requirements. Otherwise, the aforementioned optimized conditions will not be present. It is particularly convenient that the increment of one adjusting step in error detection is possibly equal to the 30 modifying step having a multiplicative and an additive correcting step in error correction. However, there is no need for complete equivalence because the operation is iterative and, thus, differences between error detection and error correction can occur. Only differences of more than approximately 50% between the adjusting step and the modifying step will result in a difference of one step at most. If the difference is less than approximately 50%, there will be no difference in the end because the values of the analog signal will be rounded off.
The use of the stored actual peak values instead of the instantaneous values of the sine and cosine signals preferably ensures substantially error-free functioning both for relatively low frequencies and for relatively high frequencies. For low frequencies, relatively precise detection the zero crossing of one signal allows for the peak value of the other signal to be determined. The normally-inevitable phenomena of self-discharge of hold capacitors used for storage of the signals is harmless in this case, because at low frequencies the output signal of the storage circuitry follows the input signal whose peak value is to be stored. The exact detection of the zero crossing is not a problem at low frequencies, since signal transitions are correspondingly slow and, consequently, negligible. At higher frequencies, however, the correct functioning of the actual peak value storage is ensured. The storage allows a substantially exact evaluation of the actual peak values even near a zero crossing, because there may be only a short period of time between the peak value and the zero crossing.
Thus, the use of the peak value detectors having a storage function automatically allows a relatively smooth transition between precisely timed sampling of the signal and imprecisely timed sampling of the stored actual peak values. Of course, in principle the method is limited in that only a predetermined number of modifying steps can take place within a part of a period at a predetermined stepping frequency. Even with the peak value detectors functioning ideally, the current adjusting operation is interrupted upon reaching the opposite actual peak value, in order to start the next adjusting operation. Consequently, the clock frequency of the adjusting steps should amount to about four times the signal frequency, thus allowing at least two adjusting steps to be carried out per part of a signal period.
Since a modifying step contains both a multiplicative and an additive correction and thus equally influence signal amplitude and offset, a relatively rapid convergence of the conditioning operation is ensured, except in cases of a pure offset error or a pure amplitude error. The product of the size of an adjusting step and of the number of possible steps within one part of the signal period determines the adjusting range possible within one part of the signal period.
Carrying out the error correction near a zero crossing of the signal, as provided according to an exemplary embodiment of the present, allows a relatively unnoticed tracking, in particular where the signal changes slowly, because, in a correction in or near the zero crossing, only the additive components of a modifying step will lead to changes in the value of the signal, but the multiplicative components in the zero crossing will not be relatively noticeable.
In addition to two orthogonal (sine and cosine) signals, a synchronization signal is also present in some measuring systems. The synchronization signal is periodic but asymmetrically periodic. The synchronization signal may be a gaussian pulse which occurs once with a certain period, i.e., except for its pulse, the synchronization signal is always equal to the negative peak value. Such synchronization signal may also be conditioned using the above-discussed method. It is assumed that the synchronization signal has a maximum positive peak substantially at a positive cross-over of the two orthogonal (sine and cosine) signals. However, at the adjacent cross-overs of the positive half-waves of the orthogonal signals, the negative peak value of the synchronization signal is present. The conditioning is then carried out in analogy to the conditioning of the orthogonal signals, by using the positive cross-over of the two orthogonal (sine and cosine) signals in the positive part of the period of the synchronization signal as the triggering event for determining the actual peak value thereof. Starting from substantially this point in time, the afore-described conditioning according to the exemplary embodiment of the present invention may be carried out for the case of adjusting the positive actual peak value. The cross-overs of the positive half-waves of the orthogonal (sine and cosine) signals, where the synchronization signal is located in the negative part of the period, may be used to initiate the correction of the synchronization signal to the negative desired peak value.
Advantageously, the exemplary method may also be applied to phase correction for signal conditioning of the orthogonal signals. To this end, the phase deviation resulting from the time relationship between the zero crossing of one signal and the peak value of the other signal is transformed into amplitude information, which is then detectable by a suitable amplitude comparison. This may be achieved by superimposing conditioned sine and cosine signal that have each been conditioned by a factor of {square root over (2)}/2, so that a new sinusoidal signal is generated. The difference between the actual peak value and the desired peak value of the sine or cosine signal is a measure of the error in the phase difference of the orthogonal signals. Conveniently, the comparison between the actual peak value of this auxiliary signal thus obtained and the desired peak value of the sine or cosine signal carried out according to the invention allows for obtaining the direction for incrementing a phase adjusting element, which may then be directly controlled. For an incremental phase displacement of one of the two sine or cosine signals for the purpose of correcting the phase relationship of both signals, one of the signals may be regarded as the reference signal, so that the phase correction needs to be carried out only on the other, namely the second signal. The reference signal may be selected at will.
The phase correction is particularly easily effected by superimposing a weighted portion of the reference signal on the remaining second signal by analog addition, so that the resulting signal has a modified phase location.
An exemplary embodiment of the present invention includes a device for conditioning a periodic analog signal to have values between predetermined, positive and negative desired peak values. The device includes an amplitude and offset adjusting device, to which the signal is supplied and which outputs a conditioned signal in amplified or attenuated form and with an increased or decreased signal level; a peak value detector, to which the signal is supplied and which outputs an actual peak value at an output until the detector is reset via a reset input; a reference voltage source, which is adjustable through a control input; and a control circuit, connected to the control input of the reference voltage source, for adjusting the reference voltage source in adjusting steps from a predetermined value corresponding to the desired peak value, to the actual peak value which is at the output of the peak value detector, and which stores the number and direction of the adjusting steps in two or more storage elements and then stepwise adjusts the amplitude and offset adjusting device simultaneously, depending on the stored number and direction.
The circuit, which serves in particular to carry out signal conditioning as described above, has the advantage that the circuit requires no expensive microprocessors but merely simple, relatively low-cost components. Further, the circuit has a modular structure because the elements used therein, namely the amplitude and offset adjusting device, peak value detector, reference voltage source and control circuit, may be provided in identical structures accordingly also for a plurality of analog signals to be conditioned.
In one implementation of the circuit, a reference comparator is provided that is connected to the output of the reference voltage source and to the peak value detector. The logic value at the output of the reference comparator indicates to the control circuit whether the signals applied to the inputs of the reference comparator are identical, i.e. whether the signal delivered by the reference voltage source has approached the actual peak values stored in the peak value detector.
If a circuit for conditioning two orthogonal signals is to be used, it is particularly convenient to provide a zero detector for each signal channel. The outputs of the zero detectors are then each connected to the control circuits of the other signal channel, so that a zero value in a signal channel detected by a zero detector indicates to the control circuit of the other signal channel the presence of a peak value in the other signal channel.
In one exemplary embodiment, a circuit is provided for signal conditioning three signals, two of which are orthogonal signals and a third signal being a synchronization signal as described above. The circuit for conditioning the synchronization signal includes an amplitude and offset adjusting device, a peak value detector, a zero detector, an adjustable reference voltage source, a control circuit and a level comparator to which the two orthogonal signals are supplied. The control circuit only sets the reference voltage source corresponding to the synchronization signal to the actual peak value provided by the peak value detector if the level comparator indicates the same level for both orthogonal signals. This embodiment also may have a modular structure with simple circuitry.
Embodiments of the present invention are not limited to the use for conditioning two orthogonal signals.
It is understood that conditioning of a single signal is also possible, in which case the presence of a peak value must be detected in a suitable manner, e.g. by means of a gradient analysis.